Macbook

您所在的位置:网站首页 mac的administrator 账号怎么查看 Macbook

Macbook

2023-07-06 16:51| 来源: 网络整理| 查看: 265

1、mysql下载,官网地址:https://dev.mysql.com/downloads/mysql/ 2、OS版本选择,怎么查看处理器是ARM 还是 x86? 可通过终端输入命令来判断:

uname -a

在这里插入图片描述 3、选择合适的dmg下载,可选择不登录下载,这里尝试用最新的版本8.0.32 ; 在这里插入图片描述 4、打开安装,一路选择【next】,其中Configuration步骤会有两个选项: use strong password encryption:使用强密码加密,建议使用这个方式。 use legacy password encryption:使用老式的密码加密。

5、给root账户设置密码, 新版本需要设置密码,如果是老版本,需要记住系统生成的密码;

6、查看mysql安装路径,打开终端输入命令:

ps -ef |grep mysql` 74 67724 1 0 4:25下午 ?? 0:00.94 /usr/local/mysql/bin/mysql... 501 68202 68091 0 4:28下午 ttys000 0:00.01 grep mysql

7、设置MySQL的bin路径,终端输入:

open ~/.bash_profile

打开文件输入内容:

PATH="$PATH":/usr/local/mysql/bin

8、配置文件立即生效

source ~/.bash_profile

9、登录mysql,终端输入命令:

mysql -u root -p

10、输入密码,mysql安装成功;

cheng@192 ~ % mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 8.0.32 MySQL Community Server - GPL Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>

命令行执行sql不太方便,可以安装下mysql客户端, 免费的可视化工具推荐:workbench 下载地址:https://downloads.mysql.com/archives/workbench/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3